home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19990725-20000114 / 000431_news@columbia.edu _Sun Jan 9 10:53:58 2000.msg < prev    next >
Internet Message Format  |  2020-01-01  |  8KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id KAA15052
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Sun, 9 Jan 2000 10:53:58 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id KAA24119
  7.     for kermit.misc@watsun.cc.columbia.edu; Sun, 9 Jan 2000 10:32:18 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Subject: Case Study #03: Autodownload
  11. Date: 9 Jan 2000 15:32:17 GMT
  12. Organization: Columbia University
  13. Message-ID: <85a9m1$nhl$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16.  
  17. Today we're showcasing C-Kermit's "autodownload" feature.  Kermit 95
  18. and MS-DOS Kermit have this feature too.  If you use Kermit as a terminal
  19. emulator (or in C-Kermit's case, to make terminal connections) AND for
  20. file transfer, autodownload makes file transfer ridiculously easy.
  21.  
  22. First, recall the contortions needed when you don't have this feature: you
  23. have to tell Kermit on the host to send (or receive), then "escape back" to
  24. your terminal emulator, tell it to receive (or send), wait for the transfer
  25. to complete, and then tell your terminal emulator to resume terminal
  26. emulation.  Four steps, not counting the waiting.  With autodownload,
  27. there's just one step.
  28.  
  29. To illustrate, let's say you have a Linux PC on your desk, and you use
  30. C-Kermit 7.0 there to place a call (or make a Telnet connection) to a VMS
  31. host, which also has C-Kermit.  You log in, read your mail, etc, and then
  32. when you want to send (download) a file, say "oofa.txt", from VMS to Linux,
  33. you just tell VMS C-Kermit to send it; assuming VMS C-Kermit is installed
  34. correctly, you simply type:
  35.  
  36.   kermit -s oofa.txt
  37.  
  38. at the DCL prompt.  Ditto if this were UNIX instead of VMS, except in
  39. UNIX it's the "shell prompt".  Ditto for AOS/VS, except there it's the "CLI
  40. prompt", and so on.  (Of course you could also start C-Kermit and type
  41. "send oofa.txt" at the C-Kermit> prompt, and then exit when done, but who
  42. needs the extra steps?)
  43.  
  44. Now, after a second or two (or more -- we'll discuss the delay below),
  45. Kermit on the host sends its first file-transfer packet, and C-Kermit on
  46. your desktop PC recognizes it and instantly switches from terminal mode to
  47. file-transfer mode, in which it puts up a running progress display, in most
  48. cases complete with thermometer and other info.  When the transfer is
  49. complete, C-Kermit automatically goes back to its terminal screen.
  50.  
  51. That's it; that's autodownload.  Try it!  Notice that, after making the
  52. initial connection, you never had to interact directly with your desktop
  53. Kermit again.  Even when (eventually) you log out from the host, your
  54. desktop Kermit pops back to its prompt automatically when the connection
  55. closes.  Thus, you control everything from within the terminal screen by the
  56. commands that you give to the host.  All that confusing "escaping back" and
  57. "reconnecting" is no longer needed.
  58.  
  59. What about uploading?  It works exactly the same way, except in this case
  60. you have to tell the host Kermit to GET a file, rather than to SEND one. 
  61. Suppose you have just saved a web page from your Web browser on your PC
  62. (as, say, "oofa.html") and you want to upload it to the host.  Just give the
  63. following command at the DCL (shell, CLI, ...) prompt on your host:
  64.  
  65.   kermit -g oofa.html
  66.  
  67. (Or equivalently, start C-Kermit on the host, tell it to "get oofa.html",
  68. and then exit when done.)
  69.  
  70. When your desktop Kermit sees the first packet, it automatically pops back
  71. to file-transfer mode and awaits further instructions from the host Kermit,
  72. which then sends the name of the file it wants; your desktop Kermit sends
  73. the file and then returns to the terminal screen automatically when done.
  74.  
  75. Now let's talk about the delay.  If it takes a little while for the transfer
  76. to start, it's because (a) the host Kermit is processing its initialization
  77. file; (b) it has its DELAY parameter set to some annoying number of seconds,
  78. like 5 or 10 or 20; or (c) both.  The DELAY parameter is there for the
  79. benefit of terminal emulators that don't have the autodownload feature.  It
  80. gives the user time to manually put the emulator into the appropriate
  81. file-transfer mode.  But we don't need a delay if we are autodownloading.
  82. The way to get rid of it is to include:
  83.  
  84.   set delay 0
  85.  
  86. in the host Kermit's initialization or customization file, or to include
  87. the equivalent "-D 0" command-line option:
  88.  
  89.   kermit -D 0 -g oofa.html
  90.  
  91. Now let's consider the host Kermit's initialization file.  The standard
  92. C-Kermit initialization file is rather big -- it defines all sorts of macros
  93. and services that you won't need in this situation.  However, it also
  94. "chains" to your customization file, where you might well have set some
  95. performance-enhancing parameters to override Kermit's (former) conservative
  96. default settings.
  97.  
  98. But C-Kermit 7.0, unlike its predecessors, uses fast settings by default
  99. because computers and connections are much faster and more reliable now
  100. than they were when the Kermit protocol was first designed.  So C-Kermit on
  101. the host doesn't need to execute its initialization file -- or your
  102. customization file -- at all, unless you are actually making a connection
  103. FROM the host to somewhere else.
  104.  
  105. There are two ways to start host Kermit without executing its initialization
  106. file.  First, you can change the name of the standard initialization file so
  107. C-Kermit won't find it automatically (and then explicitly execute it any
  108. time you actually need it), and second you can give the -Y (uppercase)
  109. command-line option, which tells C-Kermit to skip its initialization file:
  110.  
  111.   kermit -YD 0 -g oofa.html
  112.  
  113. If the host is VMS, you have to enclose uppercase command-line items in
  114. doublequotes:
  115.  
  116.   kermit "-YD" 0 -g oofa.html
  117.  
  118. Since the -Y option does not take an argument, it can be "bundled" before
  119. the -D option.  But it need not be; the following is OK too:
  120.  
  121.   kermit -Y -D 0 -g oofa.html
  122.  
  123. Finally, if the remote host is UNIX, you might consider using G-Kermit there
  124. instead of C-Kermit:
  125.  
  126.   http://www.columbia.edu/kermit/gkermit.html
  127.  
  128. It's perfect for use with a Kermit autodownload-capable terminal emulator on
  129. your desktop -- in fact, that's what it's designed for.  G-Kermit is small,
  130. its delay is 1 second, and it has no initialization file to slow it down:
  131.  
  132.   gkermit -s oofa.txt
  133.   gkermit -r oofa.html
  134.  
  135. In most cases, G-Kermit goes just as fast as C-Kermit.
  136.  
  137. Still reading?  OK...  Are there any situations where autodownload is a 
  138. BAD thing?  Indeed there are.  First, consider a multihop connection in
  139. which both your desktop computer and the intermediate one are capable of
  140. autodownloads.  When the remote(st) Kermit sends its first packet, BOTH
  141. Kermits see it at the same time, both automatically enter file-transfer
  142. mode, and both reply to it.  This can't work.  C-Kermit 7.0 solves this
  143. problem by filtering out "autodetected" packets and not passing them down
  144. the line, but earlier versions don't do this.
  145.  
  146. A second scenario in which autodownload is inappropriate is when you are
  147. using your terminal emulator to look at a C-Kermit packet log on the host.
  148. (Try it some time :-)
  149.  
  150. In such situations, you can disable autodownload in C-Kermit with the
  151. command:
  152.  
  153.   SET TERMINAL AUTODOWNLOAD OFF
  154.  
  155. You would also do this on a multihop connection when you want the
  156. intermediate C-Kermit to be the transparent one, and autodownloads to go
  157. through it to your desktop.  There is, by the way, a (new) C-Kermit
  158. command-line option that tells it to be 100% transparent, intended for
  159. exactly this situation: "C-Kermit in the Middle":
  160.  
  161.   kermit -0
  162.  
  163. (that's hyphen followed by digit 0).  This sets TERMINAL AUTODOWNLOAD OFF,
  164. disables the escape character, APC, and everything else.
  165.  
  166. Still there?  Perhaps you're wondering if autodownload works with external
  167. protocols like Zmodem?  In a word, yes.  If you have a Zmodem program that
  168. works with C-Kermit as an external protocol, then C-Kermit will indeed start
  169. it up automatically when you initiate a Zmodem download from the host.
  170. AutoUPloads, however, are not possible with Zmodem.  External protocols are
  171. described in detail in the manual, "Using C-Kermit", Chapter 14.
  172.  
  173. - Frank